package com.j2110.dao;

import com.j2110.pojo.User;
import com.j2110.utils.DSUtil;

import java.util.List;

public class UserDao {

    public User queryByUsername(String username){
        List<User> list = DSUtil.query("select * from user where username = ?", User.class, username);
        if (list != null && list.size() > 0){
            return list.get(0);
        }
        return null;
    }


}
